package DesignMode.Memento;

/**
 * @author VX5
 * @Title: MJC
 * @ProjectName DataStructure
 * @Description: TODO
 * @date ${DAT}15:15
 */
public class Originator {//发起人
    private String state;

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }
    public Memento CreateMemento(){
        return new Memento(state);
    }

    public void SetMemento(Memento memento){
        state = memento.getState();
    }

    public void Show(){
        System.out.println(state);
    }
}
